
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    height: 100vh;
    display: flex;
    flex-direction: column;
    background: #1e1e1e;
    font-family: 'Segoe UI', sans-serif;
}

/* 新增标题栏样式 */
#title-bar {
    background: #333;
    height: 40px;
    display: flex;
    align-items: center;
    padding: 0 20px;
    border-bottom: 1px solid #444;
    color: white;
}

.title {
    font-weight: bold;
    margin-right: 30px;
    color: #28a745;
}

/* 更新后的菜单样式 */
.menu {
    display: flex;
    position: relative;
}

.menu-item {
    position: relative;
    padding: 6px 12px;
    color: #ddd;
    cursor: pointer;
    transition: all 0.3s;
}

.menu-item:hover {
    background: #444;
}

/* 下拉菜单样式 */
.dropdown-content {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: #333;
    min-width: 120px;
    border-radius: 4px;
    box-shadow: 0 8px 16px rgba(0,0,0,0.3);
    z-index: 100;
}

.dropdown:hover .dropdown-content {
    display: block;
}

.dropdown-content div {
    padding: 10px 15px;
    color: #ddd;
    transition: background 0.2s;
}

.dropdown-content div:hover {
    background: #28a745;
    color: white;
}

.menu-btn {
    background: none;
    border: none;
    color: #ddd;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s;
}

.menu-btn:hover {
    background: #444;
    color: white;
}

.file-name-box {
    margin-left: auto;
}

#file-name-input {
    background: #444;
    border: 1px solid #555;
    padding: 6px 12px;
    border-radius: 15px;
    color: white;
    width: 200px;
    outline: none;
}

#file-name-input:focus {
    border-color: #28a745;
}

/* 调整原有编辑器容器的位置 */
#editor-wrapper {
    flex: 1;
    position: relative;
    min-height: calc(100vh - 240px);
    /* 减去标题栏和控制台高度 */
}

#editor-container {
    height: 100%;
}

#run-btn {
    position: absolute;
    bottom: 20px;
    right: 20px;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: #28a745;
    color: white;
    border: none;
    cursor: pointer;
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.3);
    transition: transform 0.2s, background 0.3s;
    z-index: 10;
}

#run-btn:hover {
    background: #218838;
    transform: scale(1.1);
}

#console-wrapper {
    background: #252526;
    color: white;
    transition: height 0.3s;
    height: 200px;
}

#console-wrapper.collapsed {
    height: 0;
}

#console-header {
    background: #333;
    padding: 12px 20px;
    cursor: pointer;
    user-select: none;
}

#console-output {
    height: calc(100% - 40px);
    overflow-y: auto;
    padding: 15px;
    font-family: monospace;
    white-space: pre-wrap;
    background: #1e1e1e;
}

.error {
    color: #ff5555;
}

.CodeMirror {
    height: 100% !important;
    font-size: 14px;
    padding: 10px 0;
}